function visu2(){
	var Canvas;
	var Ctx;
	var CanvasHeight;
	var CanvasWidth;
	var Analyser;
    var Run = false; 
    
	var spectrumStyle;
	
	var init = function(){
		$("body").append('<canvas id="visu2"  style="position:absolute;right:0px;top:0px;"></canvas>');
		Canvas = $("#visu2")[0];
		Ctx = Canvas.getContext("2d");
	
		
		//canvas width and height nachziehen wenn sich größe ändert
		//und auch den Factor neu setzten
		Canvas.height = CanvasHeight = 400;
		Canvas.width = CanvasWidth = 700;
		Analyser = CORE.getAnalyser();
		Analyser.smoothingTimeConstant = 0.9;

		CORE.attach("onStateChanged", onStateChanged);
		CORE.attach("onPositionChanged", onPositionChanged);
		//set gardien
		spectrumStyle = Ctx.createLinearGradient(0, CanvasHeight, 0, 20);
		spectrumStyle.addColorStop(0.95, '#F00');
		spectrumStyle.addColorStop(0.85, '#FF8000');
		spectrumStyle.addColorStop(0.60, '#FF5E00');
		spectrumStyle.addColorStop(0.00, '#9DFF00');
		
		
		update();
	};
	
	var update = function(){
		window.webkitRequestAnimationFrame(update, Canvas);
		if(!Run)return;
		var freqByteData = new Uint8Array(Analyser.frequencyBinCount);
		Analyser.getByteFrequencyData(freqByteData); //analyser.getByteTimeDomainData(freqByteData);
		Ctx.clearRect(0,0,CanvasWidth,CanvasHeight);

		//Ctx.fillStyle = 'rgba(0, 0, 0, 0.15)';
		Ctx.strokeStyle = spectrumStyle; //'#9F0';
		Ctx.fillStyle = 'rgba(0, 0, 0, 0.20)';
		Ctx.lineWidth = 5;
		Ctx.beginPath();
		Ctx.moveTo(-10, CanvasHeight+10);
		var maxval = 0;
		var peak = [];
		for(var i=0; i < freqByteData.length; i+=1) {
			var mag = freqByteData[i];
			Ctx.lineTo(i, CanvasHeight-mag);
		}
		Ctx.lineTo(CanvasWidth+10, CanvasHeight+10);
		Ctx.closePath();
		Ctx.stroke();
		Ctx.fill();
	};

	var onPositionChanged = function(e){

	};

	var onStateChanged = function(e){
		if(e.playing){
			Run = true;
		}else{
			Run = false;
		}
	};
	
	init();
}
